package com.homework2;

import java.lang.annotation.*;

/**
 * @author :  DongZheng Wang
 * @PROJECT_NAME: java泛型
 * @date :  2022-10-26 16:43
 **/

public class Myhomwork3 {
    public static void main(String[] args) {
        Myhomwork5 myhomwork5 = new Myhomwork5();
        myhomwork5.setMy(12);
    }
}
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE,ElementType.FIELD,ElementType.METHOD,ElementType.PARAMETER,
        ElementType.LOCAL_VARIABLE,ElementType.ANNOTATION_TYPE,ElementType.CONSTRUCTOR})
@interface Myhomwork{

}
@Myhomwork
@interface Myhomwork1{

}
@Myhomwork
class Myhomwork5{
    @Myhomwork
    private int my;
    private int my1;
    public void setMy( @Myhomwork int my) {
        @Myhomwork
        int my2 = 12;
        System.out.println("setMy: " + my);
    }
    @Myhomwork
    public Myhomwork5() {
    }
}